/*
 * Copyright (c) zhg2yqq.com Corp.
 * All Rights Reserved.
 */
package com.zhg2yqq.wheels.job.core;

import java.io.Serializable;
import java.util.Map;

/**
 * @author zhg2yqq, 2023年11月14日
 * @version zhg2yqq v1.0
 */
public class JobParameter implements Serializable {
    private static final long serialVersionUID = 1L;
    // 区分作业标识
    private String key;
    // 所属分组
    private String group;
    // 作业名称
    private String jobName;
    // 可以是IJob的BeanName或者Class的QualifiedName
    private String targetName;
    // 参数
    private Map<String, String> parameters;
    // 额外参数，主要提供给作业回调事件使用
    private Object extra;

    /**
     * @param key 区分作业标识
     */
    public JobParameter(String key) {
        this(key, "Default");
    }

    /**
     * @param key   区分作业标识
     * @param group 作业所属分组
     */
    public JobParameter(String key, String group) {
        super();
        this.key = key;
        this.group = group;
    }

    public String getKey() {
        return key;
    }

    public String getGroup() {
        return group;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getTargetName() {
        return targetName;
    }

    public void setTargetName(String targetName) {
        this.targetName = targetName;
    }

    public Map<String, String> getParameters() {
        return parameters;
    }

    public void setParameters(Map<String, String> parameters) {
        this.parameters = parameters;
    }

    public Object getExtra() {
        return extra;
    }

    public void setExtra(Object extra) {
        this.extra = extra;
    }
}
